package org.apache.jena.query.spatial ;

import java.util.List ;
import java.util.Map ;

import org.apache.jena.atlas.lib.Closeable ;
import org.apache.lucene.spatial.query.SpatialOperation;

import com.hp.hpl.jena.graph.Node ;
import com.spatial4j.core.shape.Point;
import com.spatial4j.core.shape.Shape;

/** SpatialIndex abstraction */ 
public interface SpatialIndex extends Closeable //, Transactional 
{
    // Update operations
    public abstract void startIndexing() ;
    public abstract void add(String EntityURI, Shape... shapes) ;
    public abstract void finishIndexing() ;
    public abstract void abortIndexing() ;
    
    /** Access the index - limit if -1 for as many as possible */    
    public abstract List<Node> query(Shape shape, int limit, SpatialOperation operation);

    public abstract EntityDefinition getDocDef() ;
}
